$(function(){

    $.ajax({
        url: "http://127.0.0.1:9090/api/getcoupon",
        dataType: "json",
        success: function(result){
            console.log(result);
            $(".discounts").html(template("temp",result));
        }
    });

});